#ifndef TSS_H
#define TSS_H

#include <types.h>

struct tss_entry_struct
{
unsigned short link;
unsigned short link_h;

unsigned long esp0;
unsigned short ss0;
unsigned short ss0_h;
unsigned long esp1;
unsigned short ss1;
unsigned short ss1_h;
unsigned long esp2;
unsigned short ss2;
unsigned short ss2_h;
unsigned long cr3;
unsigned long eip;
unsigned long eflags;
unsigned long eax;
unsigned long ecx;
unsigned long edx;
unsigned long ebx;
unsigned long esp;
unsigned long ebp;
unsigned long esi;
unsigned long edi;
unsigned short es;
unsigned short es_h;
unsigned short cs;
unsigned short cs_h;
unsigned short ss;
unsigned short ss_h;
unsigned short fs;
unsigned short fs_h;
unsigned short gs;
unsigned short gs_h;
unsigned short ldt;
unsigned short ldt_h;
unsigned short trap;
unsigned short iomap;
} __attribute__((packed));

typedef struct tss_entry_struct tss_entry_t; 

//static void write_tss(int32_t, uint16_t, uint32_t);


tss_entry_t sys_tss;


#endif
